3.44 \(\int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx\)

Optimal. Leaf size=156 \[ \frac{a^3 c^3 (A+B) \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 c^3 (3 A+4 B) \cos ^5(e+f x)}{f \left (c^2-c^2 \sin (e+f x)\right )^2}+\frac{5 a^3 (3 A+4 B) \cos ^3(e+f x)}{3 c f}-\frac{5 a^3 (3 A+4 B) \sin (e+f x) \cos (e+f x)}{2 c f}-\frac{5 a^3 x (3 A+4 B)}{2 c} \]

[Out]

(-5*a^3*(3*A + 4*B)*x)/(2*c) + (5*a^3*(3*A + 4*B)*Cos[e + f*x]^3)/(3*c*f) - (5*a^3*(3*A + 4*B)*Cos[e + f*x]*Si
n[e + f*x])/(2*c*f) + (a^3*(A + B)*c^3*Cos[e + f*x]^7)/(f*(c - c*Sin[e + f*x])^4) + (2*a^3*(3*A + 4*B)*c^3*Cos
[e + f*x]^5)/(f*(c^2 - c^2*Sin[e + f*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.310391, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {2967, 2859, 2680, 2682, 2635, 8} \[ \frac{a^3 c^3 (A+B) \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 c^3 (3 A+4 B) \cos ^5(e+f x)}{f \left (c^2-c^2 \sin (e+f x)\right )^2}+\frac{5 a^3 (3 A+4 B) \cos ^3(e+f x)}{3 c f}-\frac{5 a^3 (3 A+4 B) \sin (e+f x) \cos (e+f x)}{2 c f}-\frac{5 a^3 x (3 A+4 B)}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/(c - c*Sin[e + f*x]),x]

[Out]

(-5*a^3*(3*A + 4*B)*x)/(2*c) + (5*a^3*(3*A + 4*B)*Cos[e + f*x]^3)/(3*c*f) - (5*a^3*(3*A + 4*B)*Cos[e + f*x]*Si
n[e + f*x])/(2*c*f) + (a^3*(A + B)*c^3*Cos[e + f*x]^7)/(f*(c - c*Sin[e + f*x])^4) + (2*a^3*(3*A + 4*B)*c^3*Cos
[e + f*x]^5)/(f*(c^2 - c^2*Sin[e + f*x])^2)

Rule 2967

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rule 2859

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[((b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*(2*m +
p + 1)), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rule 2680

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(2*g*(
g*Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(2*m + p + 1)), x] + Dist[(g^2*(p - 1))/(b^2*(2*m +
 p + 1)), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rule 2682

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(g*(g*Cos[e
 + f*x])^(p - 1))/(b*f*(p - 1)), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx &=\left (a^3 c^3\right ) \int \frac{\cos ^6(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^4} \, dx\\ &=\frac{a^3 (A+B) c^3 \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}-\left (a^3 (3 A+4 B) c^2\right ) \int \frac{\cos ^6(e+f x)}{(c-c \sin (e+f x))^3} \, dx\\ &=\frac{a^3 (A+B) c^3 \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 (3 A+4 B) c \cos ^5(e+f x)}{f (c-c \sin (e+f x))^2}-\left (5 a^3 (3 A+4 B)\right ) \int \frac{\cos ^4(e+f x)}{c-c \sin (e+f x)} \, dx\\ &=\frac{5 a^3 (3 A+4 B) \cos ^3(e+f x)}{3 c f}+\frac{a^3 (A+B) c^3 \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 (3 A+4 B) c \cos ^5(e+f x)}{f (c-c \sin (e+f x))^2}-\frac{\left (5 a^3 (3 A+4 B)\right ) \int \cos ^2(e+f x) \, dx}{c}\\ &=\frac{5 a^3 (3 A+4 B) \cos ^3(e+f x)}{3 c f}-\frac{5 a^3 (3 A+4 B) \cos (e+f x) \sin (e+f x)}{2 c f}+\frac{a^3 (A+B) c^3 \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 (3 A+4 B) c \cos ^5(e+f x)}{f (c-c \sin (e+f x))^2}-\frac{\left (5 a^3 (3 A+4 B)\right ) \int 1 \, dx}{2 c}\\ &=-\frac{5 a^3 (3 A+4 B) x}{2 c}+\frac{5 a^3 (3 A+4 B) \cos ^3(e+f x)}{3 c f}-\frac{5 a^3 (3 A+4 B) \cos (e+f x) \sin (e+f x)}{2 c f}+\frac{a^3 (A+B) c^3 \cos ^7(e+f x)}{f (c-c \sin (e+f x))^4}+\frac{2 a^3 (3 A+4 B) c \cos ^5(e+f x)}{f (c-c \sin (e+f x))^2}\\ \end{align*}

Mathematica [A]  time = 1.50778, size = 223, normalized size = 1.43 \[ \frac{a^3 (\sin (e+f x)+1)^3 \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac{1}{2} (e+f x)\right ) (30 (3 A+4 B) (e+f x)-3 (A+4 B) \sin (2 (e+f x))-3 (16 A+31 B) \cos (e+f x)+B \cos (3 (e+f x)))-\sin \left (\frac{1}{2} (e+f x)\right ) (-3 (A+4 B) \sin (2 (e+f x))-3 (16 A+31 B) \cos (e+f x)+6 A (15 e+15 f x+32)+24 B (5 e+5 f x+8)+B \cos (3 (e+f x)))\right )}{12 c f (\sin (e+f x)-1) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^6} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/(c - c*Sin[e + f*x]),x]

[Out]

(a^3*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])*(1 + Sin[e + f*x])^3*(Cos[(e + f*x)/2]*(30*(3*A + 4*B)*(e + f*x) -
3*(16*A + 31*B)*Cos[e + f*x] + B*Cos[3*(e + f*x)] - 3*(A + 4*B)*Sin[2*(e + f*x)]) - Sin[(e + f*x)/2]*(24*B*(8
+ 5*e + 5*f*x) + 6*A*(32 + 15*e + 15*f*x) - 3*(16*A + 31*B)*Cos[e + f*x] + B*Cos[3*(e + f*x)] - 3*(A + 4*B)*Si
n[2*(e + f*x)])))/(12*c*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6*(-1 + Sin[e + f*x]))

________________________________________________________________________________________

Maple [B]  time = 0.121, size = 449, normalized size = 2.9 \begin{align*} -16\,{\frac{A{a}^{3}}{cf \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) }}-16\,{\frac{B{a}^{3}}{cf \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) }}-{\frac{A{a}^{3}}{cf} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{5} \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) ^{-3}}-4\,{\frac{{a}^{3} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{5}B}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+8\,{\frac{{a}^{3} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{4}A}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+14\,{\frac{{a}^{3} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{4}B}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+16\,{\frac{{a}^{3} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}A}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+32\,{\frac{{a}^{3} \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}B}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+{\frac{A{a}^{3}}{cf}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) ^{-3}}+4\,{\frac{{a}^{3}\tan \left ( 1/2\,fx+e/2 \right ) B}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+8\,{\frac{A{a}^{3}}{cf \left ( 1+ \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2} \right ) ^{3}}}+{\frac{46\,B{a}^{3}}{3\,cf} \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) ^{-3}}-15\,{\frac{{a}^{3}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) A}{cf}}-20\,{\frac{{a}^{3}\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) B}{cf}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e)),x)

[Out]

-16/f*a^3/c/(tan(1/2*f*x+1/2*e)-1)*A-16/f*a^3/c/(tan(1/2*f*x+1/2*e)-1)*B-1/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*
tan(1/2*f*x+1/2*e)^5*A-4/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)^5*B+8/f*a^3/c/(1+tan(1/2*f*x+1/
2*e)^2)^3*tan(1/2*f*x+1/2*e)^4*A+14/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)^4*B+16/f*a^3/c/(1+ta
n(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)^2*A+32/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)^2*B+1/f*
a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)*A+4/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*tan(1/2*f*x+1/2*e)*
B+8/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*A+46/3/f*a^3/c/(1+tan(1/2*f*x+1/2*e)^2)^3*B-15/f*a^3/c*arctan(tan(1/2*f
*x+1/2*e))*A-20/f*a^3/c*arctan(tan(1/2*f*x+1/2*e))*B

________________________________________________________________________________________

Maxima [B]  time = 1.54042, size = 1538, normalized size = 9.86 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

-1/3*(B*a^3*((7*sin(f*x + e)/(cos(f*x + e) + 1) - 39*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 24*sin(f*x + e)^3/(
cos(f*x + e) + 1)^3 - 24*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 9*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 - 9*sin(f
*x + e)^6/(cos(f*x + e) + 1)^6 - 16)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + 3*c*sin(f*x + e)^2/(cos(f*x + e)
 + 1)^2 - 3*c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*c*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - 3*c*sin(f*x + e)
^5/(cos(f*x + e) + 1)^5 + c*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 - c*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 9*a
rctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + 18*A*a^3*((sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^2/(cos(f
*x + e) + 1)^2 - 2)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + c*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - c*sin(f*x
 + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + 18*B*a^3*((sin(f*x + e)/(cos(f*x
+ e) + 1) - sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 2)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + c*sin(f*x + e)^2
/(cos(f*x + e) + 1)^2 - c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) +
3*A*a^3*((sin(f*x + e)/(cos(f*x + e) + 1) - 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x
+ e) + 1)^3 - 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - 4)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + 2*c*sin(f*x
+ e)^2/(cos(f*x + e) + 1)^2 - 2*c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + c*sin(f*x + e)^4/(cos(f*x + e) + 1)^4
- c*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + 9*B*a^3*((sin(f*x +
e)/(cos(f*x + e) + 1) - 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 - 3*sin(
f*x + e)^4/(cos(f*x + e) + 1)^4 - 4)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + 2*c*sin(f*x + e)^2/(cos(f*x + e)
 + 1)^2 - 2*c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + c*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - c*sin(f*x + e)^5/(
cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + 18*A*a^3*(arctan(sin(f*x + e)/(cos(f*x +
 e) + 1))/c - 1/(c - c*sin(f*x + e)/(cos(f*x + e) + 1))) + 6*B*a^3*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c
- 1/(c - c*sin(f*x + e)/(cos(f*x + e) + 1))) - 6*A*a^3/(c - c*sin(f*x + e)/(cos(f*x + e) + 1)))/f

________________________________________________________________________________________

Fricas [A]  time = 1.50131, size = 533, normalized size = 3.42 \begin{align*} -\frac{2 \, B a^{3} \cos \left (f x + e\right )^{4} -{\left (3 \, A + 10 \, B\right )} a^{3} \cos \left (f x + e\right )^{3} + 15 \,{\left (3 \, A + 4 \, B\right )} a^{3} f x - 24 \,{\left (A + 2 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 48 \,{\left (A + B\right )} a^{3} + 3 \,{\left (5 \,{\left (3 \, A + 4 \, B\right )} a^{3} f x -{\left (23 \, A + 28 \, B\right )} a^{3}\right )} \cos \left (f x + e\right ) -{\left (2 \, B a^{3} \cos \left (f x + e\right )^{3} + 15 \,{\left (3 \, A + 4 \, B\right )} a^{3} f x + 3 \,{\left (A + 4 \, B\right )} a^{3} \cos \left (f x + e\right )^{2} - 3 \,{\left (7 \, A + 12 \, B\right )} a^{3} \cos \left (f x + e\right ) + 48 \,{\left (A + B\right )} a^{3}\right )} \sin \left (f x + e\right )}{6 \,{\left (c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/6*(2*B*a^3*cos(f*x + e)^4 - (3*A + 10*B)*a^3*cos(f*x + e)^3 + 15*(3*A + 4*B)*a^3*f*x - 24*(A + 2*B)*a^3*cos
(f*x + e)^2 - 48*(A + B)*a^3 + 3*(5*(3*A + 4*B)*a^3*f*x - (23*A + 28*B)*a^3)*cos(f*x + e) - (2*B*a^3*cos(f*x +
 e)^3 + 15*(3*A + 4*B)*a^3*f*x + 3*(A + 4*B)*a^3*cos(f*x + e)^2 - 3*(7*A + 12*B)*a^3*cos(f*x + e) + 48*(A + B)
*a^3)*sin(f*x + e))/(c*f*cos(f*x + e) - c*f*sin(f*x + e) + c*f)

________________________________________________________________________________________

Sympy [A]  time = 32.4657, size = 4255, normalized size = 27.28 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e)),x)

[Out]

Piecewise((-45*A*a**3*f*x*tan(e/2 + f*x/2)**7/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*
tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6
*c*f*tan(e/2 + f*x/2) - 6*c*f) + 45*A*a**3*f*x*tan(e/2 + f*x/2)**6/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2
+ f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*ta
n(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 135*A*a**3*f*x*tan(e/2 + f*x/2)**5/(6*c*f*tan(e/2 + f*x/
2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 +
 f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 135*A*a**3*f*x*tan(e/2 + f*x/2)**4
/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)
**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 135*A*a**3*f
*x*tan(e/2 + f*x/2)**3/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 1
8*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) -
 6*c*f) + 135*A*a**3*f*x*tan(e/2 + f*x/2)**2/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*t
an(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*
c*f*tan(e/2 + f*x/2) - 6*c*f) - 45*A*a**3*f*x*tan(e/2 + f*x/2)/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*
x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/
2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 45*A*a**3*f*x/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f
*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e
/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 102*A*a**3*tan(e/2 + f*x/2)**6/(6*c*f*tan(e/2 + f*x/2)**7 -
 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)
**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 54*A*a**3*tan(e/2 + f*x/2)**5/(6*c*f*tan(
e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f
*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 336*A*a**3*tan(e/2 + f*x
/2)**4/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 +
f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 96*A*a
**3*tan(e/2 + f*x/2)**3/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 -
18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2)
- 6*c*f) - 378*A*a**3*tan(e/2 + f*x/2)**2/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(
e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f
*tan(e/2 + f*x/2) - 6*c*f) + 42*A*a**3*tan(e/2 + f*x/2)/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6
 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x
/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 144*A*a**3/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 +
 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2
)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 60*B*a**3*f*x*tan(e/2 + f*x/2)**7/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*
tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 1
8*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 60*B*a**3*f*x*tan(e/2 + f*x/2)**6/(6*c*f*tan(e/2
 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*ta
n(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 180*B*a**3*f*x*tan(e/2 + f*
x/2)**5/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 +
 f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 180*B
*a**3*f*x*tan(e/2 + f*x/2)**4/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)
**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f
*x/2) - 6*c*f) - 180*B*a**3*f*x*tan(e/2 + f*x/2)**3/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 1
8*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)*
*2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 180*B*a**3*f*x*tan(e/2 + f*x/2)**2/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*t
an(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18
*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 60*B*a**3*f*x*tan(e/2 + f*x/2)/(6*c*f*tan(e/2 + f
*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/
2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 60*B*a**3*f*x/(6*c*f*tan(e/2 +
f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e
/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 120*B*a**3*tan(e/2 + f*x/2)**6
/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)
**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 108*B*a**3*t
an(e/2 + f*x/2)**5/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*
f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c
*f) - 372*B*a**3*tan(e/2 + f*x/2)**4/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 +
 f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(
e/2 + f*x/2) - 6*c*f) + 192*B*a**3*tan(e/2 + f*x/2)**3/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*tan(e/2 + f*x/2)**6
+ 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*c*f*tan(e/2 + f*x/
2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 456*B*a**3*tan(e/2 + f*x/2)**2/(6*c*f*tan(e/2 + f*x/2)**7 - 6*c*f*ta
n(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x/2)**3 - 18*
c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) + 68*B*a**3*tan(e/2 + f*x/2)/(6*c*f*tan(e/2 + f*x/2)
**7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f
*x/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f) - 188*B*a**3/(6*c*f*tan(e/2 + f*x/2)**
7 - 6*c*f*tan(e/2 + f*x/2)**6 + 18*c*f*tan(e/2 + f*x/2)**5 - 18*c*f*tan(e/2 + f*x/2)**4 + 18*c*f*tan(e/2 + f*x
/2)**3 - 18*c*f*tan(e/2 + f*x/2)**2 + 6*c*f*tan(e/2 + f*x/2) - 6*c*f), Ne(f, 0)), (x*(A + B*sin(e))*(a*sin(e)
+ a)**3/(-c*sin(e) + c), True))

________________________________________________________________________________________

Giac [A]  time = 1.17808, size = 316, normalized size = 2.03 \begin{align*} -\frac{\frac{15 \,{\left (3 \, A a^{3} + 4 \, B a^{3}\right )}{\left (f x + e\right )}}{c} + \frac{96 \,{\left (A a^{3} + B a^{3}\right )}}{c{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}} + \frac{2 \,{\left (3 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 12 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} - 24 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 42 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 48 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 96 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 3 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 12 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 24 \, A a^{3} - 46 \, B a^{3}\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1\right )}^{3} c}}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

-1/6*(15*(3*A*a^3 + 4*B*a^3)*(f*x + e)/c + 96*(A*a^3 + B*a^3)/(c*(tan(1/2*f*x + 1/2*e) - 1)) + 2*(3*A*a^3*tan(
1/2*f*x + 1/2*e)^5 + 12*B*a^3*tan(1/2*f*x + 1/2*e)^5 - 24*A*a^3*tan(1/2*f*x + 1/2*e)^4 - 42*B*a^3*tan(1/2*f*x
+ 1/2*e)^4 - 48*A*a^3*tan(1/2*f*x + 1/2*e)^2 - 96*B*a^3*tan(1/2*f*x + 1/2*e)^2 - 3*A*a^3*tan(1/2*f*x + 1/2*e)
- 12*B*a^3*tan(1/2*f*x + 1/2*e) - 24*A*a^3 - 46*B*a^3)/((tan(1/2*f*x + 1/2*e)^2 + 1)^3*c))/f